import axios from "axios";
import service from "@/config/index";

const URLS = {
  SEARCH: `${service.serviceExport}/task/search`,  //导出任务列表
  COUNT: `${service.serviceExport}/task/searchCount`, //统计导出总数
};

export default {
  search (filter) {
    return axios.post(URLS.SEARCH, filter);
  },
  //查询导出未读数
  searchCount () {
    return axios.post(URLS.COUNT, { downloaded: 0 });
  },
  updateTaskStatus (params) {
    return axios.put(`${service.serviceExport}/task/update/taskStatus`, params);
  },
  // 删除导出任务
  delete (exportTaskId) {
    return axios.delete(`${service.serviceExport}/task/${exportTaskId}`, {
      data: {
        exportTaskId
      }
    });
  },
};
